import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './plugins/element.js'
import './assets/css/global.css'
import axios from 'axios'
import "./assets/font/iconfont.css"
import TreeTable from 'vue-table-with-tree-grid'
// 配置根路径
axios.defaults.baseURL='https://lianghj.top:8888/api/private/v1/'
// axios拦截，为请求做预处理
axios.interceptors.request.use(config=>{    
    config.headers.Authorization=window.sessionStorage.getItem('token') 
    return config
})
// 全局挂在axios,这样就可以通过this来访问$http
Vue.prototype.$http=axios

Vue.config.productionTip = false
Vue.component('tree-table',TreeTable)
new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
